import http from "@/utils/http";

export const addCartAPI = (data) => {
  return http({
    url: "/member/cart",
    method: "post",
    data,
  });
};

export const getCartListAPI = () => {
  return http({
    url: "/member/cart",
  });
};
// 修改数量
export const editCartGoodAPI = (skuId, data) => {
  return http({
    url: "/member/cart/" + skuId,
    method: "put",
    data,
  });
};
// 全选
export const changeCartAPI = (data) => {
  return http({
    url: "/member/cart/selected",
    method: "put",
    data,
  });
};

export const delGoodAPI = (data) => {
  return http({
    url: "/member/cart",
    method: "DELETE",
    data,
  });
};
